package cn.tedu.micro.service.stock.service.impl;

import cn.tedu.micro.service.stock.mapper.StockMapper;
import cn.tedu.micro.service.stock.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StockServiceImpl implements StockService {
    @Autowired
    private StockMapper stockMapper;

    @Override
    public Boolean reduceStock(String productCode, Integer count) {
        Integer result = stockMapper.reduceStock(productCode,count);
        return result>=1;
    }
}
